﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AppTrans
{
    class ChartReportCategories
    {
        public const string sql = @"
SELECT DictionaryCategories.Name as Категория,
       Sum(Summa) as Сумма,
       DictionaryCurrency.Name as Валюта
FROM Transactions
       inner join DictionaryCategories on Transactions.Category = DictionaryCategories.ID
       inner join DictionaryCurrency on Transactions.Currency = DictionaryCurrency.ID
WHERE Transactions.Type = 2
GROUP BY DictionaryCategories.Name, DictionaryCurrency.Name
";
        public string Категория { get; set; }
        public decimal? Сумма { get; set; }
        public string Валюта { get; set; }
    }
}
